﻿using System;

using E.Enum;
using E.Web.UI.Page;

using X.Common;

namespace E.Web.training.exam
{
    public partial class Redirect : BasePage
    {
        protected override void ShowPage()
        {
            int id = XRequest.GetInt("id", -1);
            //int categoryid = Utils.StrToInt(Utils.GetCookie("cid"), -1);
            int categoryid = XRequest.GetInt("cid", -1); ;
            string url = "";
            switch ((EnumExamCategory)categoryid)
            {
                case EnumExamCategory.CourseExam:
                    url += "/training/exam/CourseSurvey.aspx";
                    break;
                case EnumExamCategory.CertificateExam:
                    url += "/training/exam/CertificateSurvey.aspx";
                    break;
                default: break;
            }
            if (!url.Equals("") && id != -1)
            {
                System.Web.HttpContext.Current.Response.Redirect(url + "?id=" + id + "&cid=" + categoryid);
            }
            else
            {
                Alert("提交错误");
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}
